<?php
require_once( '../npp.inc.php' );
Login::NeedLogin();

$type = $id = null;
extract( $_GET, EXTR_IF_EXISTS );

$supported_table = array( 'district', 'dept', 'disease', 'disease_info', 'health_column', 'health_info' 'hospital', );

if ( !$type || !$id )
{
	outJson('参数不完整');
}

if ( false==is_numeric($id) )
{
	if (preg_match( '/^[\d_,]+$/', $id) )
		$id = preg_split('/[_,]+/', $id, -1, PREG_SPLIT_NO_EMPTY);
	else
		outJson('非法参数');
}

if ( false==in_array($type, $supported_table) )
	outJson('不支持的类型');

Table::Delete( $type, $id );

outJson(0);
?>
